import com.duan.pojo.Books;
import com.duan.service.BookService;
import com.duan.service.BookServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Mytest {

    @Test
    public void test(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        BookService bookService = (BookService)context.getBean("BookServiceImpl");
        for (Books book:bookService.queryAllBook()
             ) {
            System.out.println(book);
        }


    }
    @Test
    public void threadPool(){
        ExecutorService service = Executors.newFixedThreadPool(10);


    }
}
